package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 渠道订单类型
 * @Description:
 * @author cyz
 * @date 2021-02-01
 */
public enum PurchaseOrderChannelTypeEnum implements IEnum<Integer> {

    BUYER(1, "buyer"),
    EUROPE(2, "欧洲"),
    IM(5, "im"),
    XYY(6, "喜羊羊"),
    JKY(8, "吉客云"),
    VIETTI(9, "VIETTI"),
    LEAM(22, "LEAM"),
    BELLETTINI(23, "BELLETTINI"),
    GB(24, "GB"),
    CAROTTA(25, "Carotta"),
    ORANGE(29, "orange"),
    UNIBUY(31, "unibuy境外"),
    UNIBUY1(35, "unibuy境内"),
    CRIS(33, "CRIS"),
    LICHENG(34, "里橙"),
    LAVITA(41, "LAVITA"),
    EFASION(46, "EFASION"),
    DAIGO(62, "DAIGO"),
    EASY(67, "易镭商品"),
    CROSSEASY(92, "跨境易镭"),
    ;

    private Integer code;
    private String msg;

    public static PurchaseOrderChannelTypeEnum valueOf(Integer code) {
        for (PurchaseOrderChannelTypeEnum value : values()) {
            if (value.getCode() == code) {
                return value;
            }
        }

        return null;
    }

    PurchaseOrderChannelTypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}
